<html>
<head><meta charset="utf-8"><title>Build rustc only · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Build.20rustc.20only.html">Build rustc only</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212724309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Build%20rustc%20only/near/212724309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> KalitaAlexey <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Build.20rustc.20only.html#212724309">(Oct 08 2020 at 17:34)</a>:</h4>
<p>I'm working on a bug in rustc. I want to compile only rustc. How can I do it? Each time I change something it builds for 5 minutes, it builds Stage 0 for some reason too. I build with <code>./x.py build -i - stage 1</code></p>



<a name="212724367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Build%20rustc%20only/near/212724367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Build.20rustc.20only.html#212724367">(Oct 08 2020 at 17:35)</a>:</h4>
<p><a href="https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html">https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html</a></p>



<a name="212724373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Build%20rustc%20only/near/212724373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Build.20rustc.20only.html#212724373">(Oct 08 2020 at 17:35)</a>:</h4>
<p>you need to build stage 0</p>



<a name="212724400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Build%20rustc%20only/near/212724400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Build.20rustc.20only.html#212724400">(Oct 08 2020 at 17:35)</a>:</h4>
<p><code>x.py build library/std</code> is the shortest command that will do what you want</p>



<a name="212724504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Build%20rustc%20only/near/212724504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> KalitaAlexey <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Build.20rustc.20only.html#212724504">(Oct 08 2020 at 17:36)</a>:</h4>
<p>Is rustc from stage0 enough?</p>



<a name="212724539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Build%20rustc%20only/near/212724539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Build.20rustc.20only.html#212724539">(Oct 08 2020 at 17:36)</a>:</h4>
<p>please read the link; 'stage 0 artifacts' is the rustc you changed</p>



<a name="212724759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Build%20rustc%20only/near/212724759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Build.20rustc.20only.html#212724759">(Oct 08 2020 at 17:38)</a>:</h4>
<p>in particular <a href="https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#understanding-stages-of-bootstrap">https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#understanding-stages-of-bootstrap</a></p>



<a name="212724853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Build%20rustc%20only/near/212724853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> KalitaAlexey <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Build.20rustc.20only.html#212724853">(Oct 08 2020 at 17:39)</a>:</h4>
<p>Oh I completely misunderstood. Reading it again - I understand. Thanks.</p>



<a name="212724937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Build%20rustc%20only/near/212724937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Build.20rustc.20only.html#212724937">(Oct 08 2020 at 17:39)</a>:</h4>
<p>wow, this is possibly the shortest someone's gone from 'what do stages mean' to 'I understand' I've ever seen <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="212724982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Build%20rustc%20only/near/212724982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Build.20rustc.20only.html#212724982">(Oct 08 2020 at 17:40)</a>:</h4>
<p>glad I could help!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>